#$ $Id: PKGBUILD 86674 2013-03-21 01:46:43Z eric $
# Maintainer: Ronald van Haren <ronald.archlinux.org>
# Contributor: JJDaNiMoTh <jjdanimoth@gmail.com>
# Contributor: nesl247 <nesl247@gmail.com>

pkgname=ccsm
pkgver=0.8.4
pkgrel=3
pkgdesc="Compizconfig Settings Manager in Python"
arch=('any')
url="http://opencompositing.org"
license=('GPL')
depends=('compiz-core>=0.8.4' 'compizconfig-python>=0.8.4' 'pygtk')
makedepends=('intltool')
groups=('compiz-fusion' 'compiz-fusion-gtk' 'compiz-fusion-kde')
conflicts=('ccsm-git')
source=(http://releases.compiz-fusion.org/${pkgver}/${pkgname}-${pkgver}.tar.bz2)
install=ccsm.install
md5sums=('6bad7a02a91cc8fc9c4c48f83e91c08c')

build() {
  cd ${pkgname}-${pkgver}

  # python2 fix
  for file in $(find . -name '*.py' -print); do
    sed -i 's_^#!.*/usr/bin/python_#!/usr/bin/python2_' $file
    sed -i 's_^#!.*/usr/bin/env.*python_#!/usr/bin/env python2_' $file
  done
}

package() {
  cd ${pkgname}-${pkgver}
  python2 ./setup.py install --prefix=/usr --root="${pkgdir}"
}
